﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Marta.buchalska.wesele.Model;

namespace Marta.buchalska.wesele.Admin
{
    public partial class Default : System.Web.UI.Page
    {
        protected void loginBtn_Click(object sender, EventArgs e)
        {
            System.Threading.Thread.Sleep(3000);
            string loginStr = login.Value;
            string passStr = password.Value;
            var user = new Model.DataBaseGateway().ValidateUser(loginStr, passStr);
            if (user != null)
            {
                new SessionAdapter(HttpContext.Current.Session).User = user;
                Response.Redirect("Dashboard.aspx");
            }
        }
    }
}